freeslot(
	"MT_BAPHBYE",
	"S_SERVE7",
	"S_SERVE8",
	"S_SERVE9",
	"S_SERVE10",
	"S_SERVE11",
	"S_SERVE12",
	"SPR_BAPC"
	--"sfx_oink"
)
	
mobjinfo[MT_BAPHBYE] = {
	--$Name "Baphomoar (Goodbye)"
	--$Sprite BAPCA0
	doomednum = 2841,
	spawnstate = S_SERVE7,
	seestate = S_SERVE7,
	deathstate = S_SERVE11,
	deathsound = sfx_oink,
	radius = 32*FRACUNIT,
	height = 80*FRACUNIT,
	flags = MF_SPECIAL|MF_RUNSPAWNFUNC|MF_NOGRAVITY|MF_NOCLIP
}

states[S_SERVE7] = {SPR_BAPC, A, 12, A_None, 0, 0, S_SERVE8}
states[S_SERVE8] = {SPR_BAPC, B, 12, A_None, 0, 0, S_SERVE9}
states[S_SERVE9] = {SPR_BAPC, C, 12, A_None, 0, 0, S_SERVE10}
states[S_SERVE10] = {SPR_BAPC, B, 12, A_None, 0, 0, S_SERVE7}
states[S_SERVE11] = {SPR_BAPC, C, 36, A_None, 0, 0, S_SERVE12}
states[S_SERVE12] = {SPR_NULL, C, 1, A_SpawnFreshCopy, 0, 0, S_NULL}

addHook("MobjThinker", function(mobj)
	if not (mobj and mobj.valid)
		return end	
	mobj.shadowscale = 1*FRACUNIT
end,MT_BAPHBYE
)